﻿@model MegaBitProject.ViewModels.CurrentGames

<div class="game">
    <div class="score">
        <h3>Current games:</h3>
        <table>
            <tr>
                <th>Nr.</th>
                <th>Game name</th>
                <th></th>
            </tr>
            @for(int i = 0; i < ((Model.id).Count < 10 ? (Model.id).Count : 10); i++)
            {
                <tr>
                    <td>@(i + 1)</td>
                    <td>@Html.ActionLink(Model.name[i] + "#" + Model.id[i], "Join/" + Model.id[i], Model.controller[i])</td>
                    <td>@Model.numPlayers[i]/@Model.maxPlayers[i]</td>
                </tr>
            }
        </table>
    </div>
</div>